<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>
    div{
        text-align: center;
        width: 200px;
        height:100px;
        position: relative;
        top:0;
        transition: top 0.5s;
        background-color: cadetblue;
        color: aliceblue;
    }

    h2{
        width: 200px;
        height:100px;
        line-height: 100px;
    }

    div:hover{
        top: -10px;
    }
</style>

<body>

<div><h2>hello</h2></div>

</body>
</html>